package com.tjw.ec.upms.api.feign;

import com.tjw.ec.common.core.constant.ServiceNameConstants;
import com.tjw.ec.common.core.util.Response;
import com.tjw.ec.common.web.config.FeignOauth2RequestInterceptor;
import com.tjw.ec.upms.api.entity.UserAccountEntity;
import com.tjw.ec.upms.api.feign.factory.RemoteUserAccountServiceFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 远程调用接口 : 用户登陆信息表
 *
 * @author T-junwen
 * @email t-junwen@foxmail.com
 * @date 2019-08-02 11:58:44
 */
@FeignClient(contextId = "remoteUserAccountService", value = ServiceNameConstants.UMPS_SERVICE, configuration = FeignOauth2RequestInterceptor.class,fallbackFactory = RemoteUserAccountServiceFallbackFactory.class)
public interface RemoteUserAccountService {

    /**
     * @Title: 根据账号查询用户账户信息
     * @Param: [username]
     * @return: com.tjw.ec.common.core.util.Response<com.tjw.ec.upms.api.entity.UserAccountEntity>
     * @Author: 田俊文
     * @Date: 2019/8/2 13:41
     * @Throws:
     */
    @GetMapping("useraccount/getUserAccountByUsername/{username}")
    Response<UserAccountEntity> getUserAccountByUsername(@PathVariable("username") String username);
}

